Skip to content

Minor wire_struct improvements:#480

Open
fdxmw wants to merge 2 commits intoUCSBarchlab:developmentfrom
fdxmw:struct
Open

Minor wire_struct improvements:#480
fdxmw wants to merge 2 commits intoUCSBarchlab:developmentfrom
fdxmw:struct

Conversation

@fdxmw
Copy link
Copy Markdown
Member

@fdxmw fdxmw commented Apr 23, 2026

  • The concatenated value can be set with the special kwarg "_value". This is useful when the wire_struct's class name is not known.

  • Changes to make wire_struct instances documentable with Sphinx. The generated class copies its docstring from the decorated class (__doc__), and the generated class's name now matches the decorated class's name. Previously all wire_struct classes were named _WireStruct.

  • Add a new class_name argument to wire_matrix. This lets users set the name of the generated class. This is optional for backwards compatibility, but highly recommended to help with debugging. Previously all wire_matrix classes were named _WireMatrix.

* The concatenated value can be set with the special `kwarg` "_value". This is
  useful when the `wire_struct`'s class name is not known.

* Changes to make `wire_struct` instances documentable with Sphinx. The
  generated class copies its docstring from the decorated class (`__doc__`),
  and the generated class's name now matches the decorated class's name.
  Previously all `wire_struct` classes were named `_WireStruct`.

* Add a new `class_name` argument to `wire_matrix`. This lets users set the
  name of the generated class. This is optional for backwards compatibility,
  but highly recommended to help with debugging. Previously all `wire_matrix`
  classes were named `_WireMatrix`.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 98.52941% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.9%. Comparing base (4ace6d3) to head (30fb11c).

Files with missing lines Patch % Lines
pyrtl/helperfuncs.py 98.6% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           development    #480     +/-   ##
=============================================
- Coverage         92.0%   91.9%   -0.0%     
=============================================
  Files               31      31             
  Lines             7508    7503      -5     
=============================================
- Hits              6901    6895      -6     
- Misses             607     608      +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant